package org.arpit.tutorial.shapes;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Arc;
import javafx.scene.shape.ArcBuilder;
import javafx.stage.Stage;


public class ArcDemo extends Application{
	public static void main(String[] args) {
		Application.launch(args);
	}

	@Override
	public void start(Stage primaryStage) {
		primaryStage.setTitle("Shapes Demo");
		VBox vbox = new VBox();
		//vbox.setPadding(new Insets(10));
		vbox.setSpacing(10);
		vbox.setStyle("-fx-border-color:blue");
		Scene scene = new Scene(vbox, 600, 600);
		
		//--------------------------------------------------------------------------
		Label label = new Label("Shapes Demo");
		
		Arc arc = new Arc();
		arc.setCenterX(250.0f);
		arc.setCenterY(250.0f);
		arc.setRadiusX(125.0f);
		arc.setRadiusY(125.0f);
		arc.setStartAngle(45.0f);
		arc.setLength(315.0f);
		arc.setFill(null);
		arc.setStroke(Color.BLACK);
		
		Arc arcNew = ArcBuilder.create()
				.centerX(100)
				.centerY(50)
				.radiusX(20)
				.radiusY(30)
				.startAngle(45)
				.length(270)
				.fill(null)
				.stroke(Color.BLACK)
				.build();
		
		
		vbox.getChildren().addAll(label, arc, arcNew);
		
		//--------------------------------------------------------------------------
		
		primaryStage.setScene(scene);
		primaryStage.show();
	}

}
